package com.jenkin.jcache.base;

import java.util.concurrent.ConcurrentHashMap;

public class CacheData {
	
	//主缓存
	private static ConcurrentHashMap<String, Object> masterCache = new ConcurrentHashMap<String, Object>(100);
	
	/**
	 * 得到主缓存中指定key的内容
	 * @param masterKey
	 * @return
	 */
	public static Object get(String masterKey) {
		if (masterCache.containsKey(masterKey)) {
			return masterCache.get(masterKey);
		}else {
			return null;
		}
	}
	
	/**
	 * 添加一条缓存内容
	 * @param masterKey
	 * @param cacheItem
	 * @return
	 */
	public static void put(String masterKey, Object object) {
		masterCache.put(masterKey, object);
	}

}
